<!-- Main content wrapper -->
<div class="wrapper">
    <form action="index.html" id="validate" class="form">

        <table style="text-align:left; width: 70%; margin-top:10px; margin-right: auto; margin-left: auto;">
            <tbody>
                <tr>

                    <td>
                        <div class="formRow" style=" padding-top:0px; border-top-style: none; border-bottom-style: none;">
                            <label>Сумма пополнения:</label>
                            <div class="formRight" style="width: 185px; margin-right: 15px; margin-left: 18px;"><input type="text" class="validate[required]" name="req" id="req"/></div>
                        </div>
                    </td>
                    <td rowspan=2 style="text-align:center;">
                        <img src="/images/img.png" alt="" />
                    </td>

                    <td rowspan=2 style="text-align:center;">
                        <img src="/images/img.png" alt=""/>
                    </td>
                </tr>
            <td style="width: 400px;">
                <div class="formRow" style="border-top-style: none; border-bottom-style: none;">
                    <label>Валюта:</label>
                    <div class="formRight" style="width: 200px; margin-right: 0px; margin-left: 18px;">
                        <select name="select2" >
                            <option value="opt1">UAH</option>
                            <option value="opt2">USD</option>
                        </select>           
                    </div>             
                </div>
            </td>

            </tr>
            <tr>

                <td>
                    <a class="button greenB" style="float:right;" title="" href="#"><span>Пополнить</span></a>
                </td>

                <td>
                    <div class="formRow" style="border-top-style: none; border-bottom-style: none;">
                        <div class="formRight" style="width: 85%; margin-right: 0px;">
                            <input type="radio" name="radio1" id="radio1" /><label for="radio1">вывод ваером</label>
                        </div>
                    </div><div class="clear"></div>
                </td>

                <td>
                    <div class="formRow" style="border-top-style: none; border-bottom-style: none;">
                        <div class="formRight" style="width: 85%; margin-right: 0px;">
                            <input type="radio" name="radio2" id="radio2" /><label for="radio2">webmoney</label>
                        </div>
                    </div><div class="clear"></div>
                </td>

            </tr>
            </tbody>
        </table>
    </form>

    <div class="line" style="margin-top: 10px;"></div>

    <table style="margin-right:auto; margin-left:auto;">
        <tbody>
            <tr>
                <td>
                    <div class="formRow" style="padding:0;">
                        <label>Starting date:</label>
                        <div class="formRight" style="float:none; margin-right:0; padding-top:5px; margin-left: 80px; width: 180px;">
                            <input type="text" class="datepicker" />
                        </div>
                    </div>
                </td>

                <td>
                    <div class="formRow" style="padding:0;">
                        <label>End date:</label>
                        <div class="formRight" style="float:none; margin-right:0; padding-top:5px; margin-left: 60px; width: 180px;">
                            <input type="text" class="datepicker" />
                        </div>
                    </div>
                </td>
                <td>
                    <a class="button greenB" style="margin: 5px;" title="" href="#"><span>построить таблицу</span></a>
                </td>
            </tr>
        </tbody>
    </table>

    <div class="widget">
        <div class="title"><img src="/images/icons/dark/full2.png" alt="" class="titleIcon" /><h6>История пополнений счета</h6></div>
        <table cellpadding="0" cellspacing="0" border="0" class="display dTable">
            <thead>
                <tr>
                    <th>Дата</th>
                    <th>Сумма</th>
                    <th>Платежка</th>
                    <th>Состояние заявки</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($this->allTransactions as $val) { ?>
                    <?php if ($val['status'] != 'completed') { ?>
                        <tr class="gradeX">
                    <?php } else { ?>
                        <tr class="gradeC"> 
                    <?php } ?>    
                            <td><a href="#" title=""><?php echo date('d-m-Y', strtotime($val['date'])); ?></a></td>
                            <td><?php echo $val['amount'].'$'; ?></td>
                            <td><?php echo $val['type']; ?></td>
                            <td><?php echo $val['status']; ?></td>
                        </tr>                
                <?php } ?>
                
            </tbody>
        </table>  
    </div>

</div>